package ${classPath}.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import ${classPath}.entity.${table.className}${entitySuffix};
import ${classPath}.param.${table.className}Param;
import ${classPath}.dao.${table.className}Dao;
import ${classPath}.service.${table.className}Service;

/**
 * ${table.remark}Service实现类
 *
 * @author ${author}
 * @version ${currentDate} ${author}
 */
@Service
public class ${table.className}ServiceImpl implements ${table.className}Service{
	
	@Autowired
    private ${table.className}Dao ${table.getPropertyName()}Dao;
	
    @Override
    public Integer insert(${table.className}${entitySuffix} entity){
    	return ${table.getPropertyName()}Dao.insert(entity);
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public Integer update(${table.className}${entitySuffix} entity){
    	return ${table.getPropertyName()}Dao.update(entity);
    }

    @Override
    public ${table.className}${entitySuffix} findById(String id){
    	return ${table.getPropertyName()}Dao.findById(id);
    }

    @Override
    public List<${table.className}${entitySuffix}> queryByPage(${table.className}Param param){
    	return ${table.getPropertyName()}Dao.queryByPage(param);
    }

    @Override
    public Integer delete(String id){
    	return ${table.getPropertyName()}Dao.delete(id);
    }
}